<?xml version="1.0"?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page"
 			xmlns:c="http://java.sun.com/jsp/jstl/core"
 			xmlns="http://www.w3.org/1999/xhtml"
 			version="2.1">
 
 <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
 <jsp:directive.page isELIgnored="false" />
 <jsp:output 	omit-xml-declaration="false" 
 			 	doctype-root-element="HTML" 
 				doctype-system="about:legacy-compat" />
 
 <jsp:useBean id="datosLogin" class="es.javamyadmin.beans.LoginBean" scope="session" />
 
 <jsp:useBean id="listaDatabasesBean" class="es.javamyadmin.beans.ListaDatabasesBean" scope="session" />
 
 <jsp:setProperty property="user" name="listaDatabasesBean" value="${datosLogin.usuario}" />
 <jsp:setProperty property="pass" name="listaDatabasesBean" value="${datosLogin.password}" />
 <jsp:setProperty property="host" name="listaDatabasesBean" value="${datosLogin.servidor}" />
 <jsp:setProperty property="port" name="listaDatabasesBean" value="${datosLogin.puerto}" />
 <script type="text/javascript"  charset="UTF-8" src="${pageContext.request.contextPath}/js/verTablasAjax.js"><!-- A --></script>


 <div id="sidebar">
 
	<div class="logo"><a href="${pageContext.request.contextPath}/jsp/inicio.jsp" title="ir al Inicio"><img src="${pageContext.request.contextPath}/images/logo-java-myadmin.png" width="250" height="96" alt="logo"/></a></div>
	
	<div id="menuSidebar">
		<div class="icono"><a href="${pageContext.request.contextPath}/jsp/inicio.jsp" title="Ir a Inicio"><img src="${pageContext.request.contextPath}/images/icons/home.png" width="20" height="20" alt="Inicio"/></a></div>
		<div class="icono"><a href="${pageContext.request.contextPath}/jsp/ver-usuarios.jsp" title="Usuarios"><img src="${pageContext.request.contextPath}/images/icons/users.png" width="20" height="20" alt="Usuarios"/></a></div>
		<div class="icono"><a onclick="window.location.reload();" href="#" title="Refrescar"><img src="${pageContext.request.contextPath}/images/icons/refrescar.png" width="20" height="20" alt="Refrescar"/></a></div>
		<div class="icono"><a href="${pageContext.request.contextPath}/cerrarSesion" title="Cerrar sesion"><img src="${pageContext.request.contextPath}/images/icons/login-out.png" width="20" height="20" alt="Salir"/></a></div>
	</div>
		
	<p>Seleccione una Base de datos</p>
	
 	<ul>	
		 <c:forEach var="lista" items="${listaDatabasesBean.databases}" varStatus="estado">
		 	<li><img src="${pageContext.request.contextPath}/images/arrow.png" height="6px" width="6px" style="float: left;cursor: pointer; margin: 6px 3px 1px 0px;" onClick="cargarTablas('${datosLogin.usuario}','${datosLogin.password}','${datosLogin.servidor}','${datosLogin.puerto}','${lista.nombreBD}')"/><form style="float: left;" id="fm${estado.index }" action="${pageContext.request.contextPath}/jsp/lista-tablas-bd.jsp" method="post"><input type="hidden" name="bd" value="${lista.nombreBD}"/><a style="cursor: pointer;" onclick="document.getElementById('fm${estado.index }').submit();">${lista.nombreBD}</a></form>
		 	<div style="clear: both;"><!-- a --></div>
		 	<span  class="oculto" id="contenido${lista.nombreBD}"><img style="margin-left: 5px;" src="${pageContext.request.contextPath}/images/loading.gif" height="15px" width="15px" /></span>
		 	</li>	 	
		 </c:forEach>
	</ul> 
 
 </div>
 
</jsp:root>